<template>
  <div>
    <div class="photo">
      <dl>
        <dt>
          <img
            :src="$store.state.userimg"
            alt=""
          />
        </dt>
        <dd>我的头像</dd>
      </dl>
    </div>
    <div class="means">
      <div class="one">
        <p>用户名:</p>
        <h6>{{ user.username }}</h6>
      </div>
      <div class="one">
        <p>ID:</p>
        <h6>{{ user.userId }}</h6>
      </div>
      <div class="one">
        <p>昵称:</p>
        <h6>{{ user.nickname }}</h6>
      </div>
      <div class="one noborder">
        <p>性别:</p>
        <h6>{{ user.sex }}</h6>
      </div>
    </div>
    <div class="means2">
      <div class="one">
        <p>QQ:</p>
        <h6>{{ user.qq }}</h6>
      </div>
      <div class="one">
        <p>邮箱:</p>
        <h6>{{ user.email}}</h6>
      </div>
      <div class="one">
        <p>手机:</p>
        <h6>{{ user.phone }}</h6>
      </div>
    </div>
  </div>
</template>

<script>
import {User} from "../../api"
export default {
  data() {
    return {
      user: {
      
      },

    };
  },
  methods:{
     User(){
      User({userId:this.$store.state.uid}).then(res=>{
        console.log(res);
        this.user = res.data.data
      })
     }
  },
  mounted(){
    // console.log(this.$store.state.uid,'ss');
    this.User()
  }
};
</script>

<style scoped>
 
.photo {
  width: 100vw;
  height: 20vh;
  /* background: deepskyblue; */
  text-align: center;
  overflow: hidden;
}
.photo img {
  width: 60px;
  height: 60px;
  border-radius: 50px;
}
.photo dl {
  margin-top: 5vh;
}
.photo dd {
  font-size: 12px;
}
.means {
  width: 100vw;
  height: 24vh;
  /* background: turquoise; */
  border-top: 6px solid #f1f1f1;
}
.means2 {
  width: 100vw;
  height: 18vh;
  /* background: wheat; */
   border-top: 6px solid #f1f1f1;
}
.one {
  width: 100vw;
  height: 6vh;
  /* background: yellow; */
  line-height: 6vh;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  font-size: 16px;
}
.one h6 {
  font-weight: normal;
}
.means2 .noborder{
    border: none;
}
</style>